<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <p>名字:{$name}</p>
    <p>年龄:{$age}</p>
    <p>性别: {if $gender == "female"} 女 {elseif $gender == "male"} 男 {else} 性别未知 {/if}</p>

    <h2>第一次使用模板</h2>
    <ul>
      {foreach $user as $key => $v}
      <li>{$v.id} -- {$v.username}</li>
      {/foreach}
    </ul>

    <ul>
      {foreach name="user" item='v' key='k'}
      <li>{$k}:{$v.id} -- {$v.username}</li>
      {/foreach}
    </ul>
  </body>
</html>
